// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from '@/router' // api: https://github.com/vuejs/vue-router
import store from '@/store' // api: https://github.com/vuejs/vuex
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
import '@/assets/scss/index.scss'
import httpRequest from '@/libs/httpRequest'
// import { isAuth } from '@/libs'
import cloneDeep from 'lodash/cloneDeep'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
import echarts from 'echarts'
import '@/assets/icons/iconfont.css'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import barrage from 'vue2-barrage'
import TreeMenu from '@/components/tree-menu/TreeMenu.vue'
import '@/assets/scss/mytheme.scss' //自定义样式
// import VueSocketIO from 'vue-socket.io'

// import '../static/plugins/UE/ueditor.config.js'
// import '../static/plugins/UE/ueditor.all.min.js'
// import '../static/plugins/UE/lang/zh-cn/zh-cn.js'
// import '../static/plugins/UE/ueditor.parse.min.js'
// import '../static/plugins/kurento/kurento-client.js'
// import '../static/plugins/kurento/kurento-utils.js'
// Vue.use(
//   new VueSocketIO({
//     debug: true,
//     connection: 'http://metinseylan.com:1992',
//     vuex: {
//       store,
//       actionPrefix: 'SOCKET_',
//       mutationPrefix: 'SOCKET_'
//     }
//   })
// )
Vue.use(VueCookie)
Vue.use(iView)
Vue.use(
  VueVideoPlayer /* {
    options: global default options,
    events: global videojs events
  } */
)
Vue.use(barrage)
Vue.config.productionTip = false

// 挂载全局
Vue.prototype.$http = httpRequest // ajax请求方法
// Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.$echarts = echarts
//直播页websocket地址
Vue.prototype.$wsLive = process.env.WS_LIVE;

// 保存整站vuex本地储存初始状态
window.SITE_CONFIG = {}
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
window.eventBus = new Vue()
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {
    App,
    TreeMenu
  },
  template: '<App/>'
})
